<script type="text/javascript" src="__PUBLIC__/js/jQuery/plugin/ajaxfileupload/ajaxfileupload.js"></script>
		<script type="text/javascript">
			// ajax 上传
            function ajaxFileUpload()
            {
                if ($("#filedata").val() == ''){
                    art.dialog({
                        content : '请选择要上传的文件！',
                        lock : true
                    });
                    return false;
                }else{
                    $.post("__APP__/Uploadfile/removefile",{file:"<?php if(isset($about['banner']) && !empty($about['banner'])){ echo $about['banner']; } ?>"},function(data){});
                    $('#old_banner').remove();
                }
                //starting setting some animation when the ajax starts and completes
                $("#loading")
                .ajaxStart(function(){
                    $(this).show();
                })
                .ajaxComplete(function(){
                    $(this).hide();
                });
        
                $.ajaxFileUpload({
                    url:'__APP__/uploadfile/upfile', 
                    secureuri:false,
                    fileElementId:'filedata',
                    dataType: 'json',
                    success: function (data, status){
                        //alert(data.msg.url);
                        if(typeof(data.error) != 'undefined'){
                            if(data.error != ''){
                                alert(data.error);
                            }else{
                                alert(data.msg);
                            }
                        }
                        $("#set_banner").after("<tr id='banner_display'><td></td><td align='left'><img src='"+data.msg.url+"' /><input type='hidden' name='banner' value='"+data.msg.url+"' /></td></tr>");
                        $("#buttonUpload").attr("disabled","disabled");
                        $("#filedata").attr("disabled","disabled");
                        $("#buttonUpload").after("&nbsp;&nbsp;<button class='attButton' id='removebanner' onclick=\"return removeFile(this,'"+data.msg.url+"');\">删除Banner</botton>");
                    },
                    error: function (data, status, e){
                        alert(e);
                    }
                });
                return false;
            }
            function removeFile(e,s){
				$.post("{:U("uploadfile/removefile")}",{file:s},function(data){});
				$("#buttonUpload").removeAttr("disabled");
				$("#filedata").removeAttr("disabled");
				$("#banner_display").remove();
				$(e).remove();
			}
		</script>